package org.jeecg.modules.hc.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Description: 购物车
 * @Author: jeecg-boot
 * @Date: 2022-12-13
 * @Version: V1.0
 */
@Data
@TableName("hc_shopping_cart")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "hc_shopping_cart对象", description = "购物车")
public class HcShoppingCart implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ApiModelProperty(value = "剩余数量")
    private Integer remainingQuantity;

    @TableField(exist = false)
    @ApiModelProperty(value = "地址ID")
    private java.lang.String addressId;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID", width = 15)
    @ApiModelProperty(value = "用户ID")
    private java.lang.String userId;
    /**
     * 商户ID
     */
    @Excel(name = "商户ID", width = 15)
    @ApiModelProperty(value = "商户ID")
    private java.lang.String merchantId;

    @TableField(exist = false)
    private HcMerchant hcMerchant;

    /**
     * 商品ID
     */
    @Excel(name = "商品ID", width = 15)
    @ApiModelProperty(value = "商品ID")
    @NotBlank(message = "商品ID不能为空")
    private java.lang.String commodityId;

    @TableField(exist = false)
    private HcCommodity hcCommodity;

    /**
     * 商品数量
     */
    @Excel(name = "商品数量", width = 15)
    @ApiModelProperty(value = "商品数量")
    @NotNull(message = "商品数量不能为空")
    private java.lang.Integer commodityQuantity;

    /**
     * 商品总价格
     */
    @Excel(name = "商品总价格", width = 15)
    @ApiModelProperty(value = "商品总价格")
    private java.math.BigDecimal commodityPrice;

    /**
     * 规格
     */
    @Excel(name = "规格", width = 15)
    @ApiModelProperty(value = "规格")
    private java.lang.String commoditySpecifications;
}
